load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("scm_client_infra")

rust_library(
    name = "edenfs-client",
    srcs = glob(["src/**/*.rs"]),
    named_deps = {
        "hg_util": "//eden/scm/lib/util:util",
    },
    os_deps = [
        (
            "windows",
            [
                "//eden/scm/exec/scratch:mkscratch",
            ],
        ),
        (
            "macos",
            [
                "fbsource//third-party/rust:psutil",
            ],
        ),
    ],
    test_deps = [
        "fbsource//third-party/rust:mockall",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:serde_test",
        "fbsource//third-party/rust:tempfile",
        "fbsource//third-party/rust:tokio",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//fb303/thrift:fb303_core-rust-clients",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-recursion",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:byteorder",
        "fbsource//third-party/rust:dirs",
        "fbsource//third-party/rust:dunce",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:hex",
        "fbsource//third-party/rust:lazy_static",
        "fbsource//third-party/rust:libc",
        "fbsource//third-party/rust:parking_lot",
        "fbsource//third-party/rust:pathdiff",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:rayon",
        "fbsource//third-party/rust:regex",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:shlex",
        "fbsource//third-party/rust:strum",
        "fbsource//third-party/rust:subprocess",
        "fbsource//third-party/rust:sysinfo",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:toml",
        "fbsource//third-party/rust:tracing",
        "fbsource//third-party/rust:uuid",
        "fbsource//third-party/rust:whoami",
        "//common/rust/cpe:cpe",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/futures_stats:futures_stats",
        "//eden/fs/cli_rs/edenfs-config:edenfs-config",
        "//eden/fs/cli_rs/edenfs-error:edenfs-error",
        "//eden/fs/cli_rs/edenfs-utils:edenfs-utils",
        "//eden/fs/rust/facebook/edenfs-telemetry:edenfs-telemetry",
        "//eden/fs/service:thrift-rust-thriftclients",
        "//eden/fs/service:thrift-streaming-rust-clients",
        "//eden/fs/service:thrift-streaming-rust-thriftclients",
        "//eden/scm/lib/atomicfile:atomicfile",
        "//eden/scm/lib/config/remote-loader:remote-loader",
        "//eden/scm/lib/http-client:http-client",
        "//eden/scm/lib/thrift-types:thrift-types",
    ],
)
